<template>
  <div id="dzgl-box">
    <div class="dzgl-title">预警管理</div>
    <dv-scroll-board :config="config" />
  </div>
</template>

<script>
import { listBjjl1} from "@/api/yjgl/bjjl";
export default {
  name: 'dzgl',
  data () {
    return {
      bjjlList:[],
      config: {
          header : [],
          data: [],
          rowNum: 4
      }
    }
  },
  mounted() {
    this.getList();
  },
  methods:{

    getList() {
      listBjjl1().then(response => {
        this.bjjlList = response;
        let arr = []
        let Machine_name = [];
        for (let i = 0; i <  this.bjjlList.length; i++) {
          Machine_name[i]= this.bjjlList[i]["bz"];
          arr.push([Machine_name[i]])
        }
        console.log(Machine_name);
        console.log(arr);

        this.config={
          data:arr,
          header:['预警信息']
        }


      });
    },

  }
}
</script>

<style lang="less">
#dzgl-box {
  width: 20%;
  box-shadow: 0 0 3px blue;
  display: flex;
  flex-direction: column;
  background-color: rgba(6, 30, 93, 0.5);
  border-top: 2px solid rgba(1, 153, 209, .5);
  box-sizing: border-box;
  padding: 0px 30px;

  .dzgl-title {
    font-weight: bold;
    height: 50px;
    display: flex;
    align-items: center;
    font-size: 20px;
  }


}
</style>
